<template>
	<el-container>
		<el-container>
            <el-header>
				<div class="left-panel">
					<div class="right-panel-search">
                        <!-- <div class="search-input">员工姓名</div> -->
						<el-input v-model="search.keyword" placeholder="请输入员工姓名" clearable />
						<el-input v-model="search.keyword" placeholder="请输入版单编号" clearable />
                        <el-date-picker v-model="search.time" type="daterange" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" :size="size"  />
						<el-button type="primary" icon="el-icon-search" @click="upsearch">搜索</el-button>
					</div>
				</div>
			</el-header>
			<el-main class="nopadding">
				<scTable ref="table" :apiObj="apiObj" stripe remoteSort remoteFilter border :params="query">
                    <el-table-column type="selection" width="80" align="center"></el-table-column>
                    <el-table-column label="版单编号" prop="order_no" align="center"></el-table-column>
                    <el-table-column label="商品名称" prop="order_no" align="center"></el-table-column>
                    <el-table-column label="一级工序" prop="apply_name" align="center"></el-table-column>
                    <el-table-column label="二级工序" prop="apply_name" align="center"></el-table-column>
                    <el-table-column label="报工人" prop="apply_name" align="center"></el-table-column>
                    <el-table-column label="报工时间" prop="apply_name" align="center"></el-table-column>
				</scTable>
			</el-main>
		</el-container>
	</el-container>
    <save-detail ref="saveDialog" @success="handleSuccess" @closed="dialog.save = false" draggable></save-detail>
</template>

<script>
import saveDetail from './saveDetail';
export default {
  components: { saveDetail },
	name: 'user',
	data() {
		return {
			dialog: {
				save: false,
			},
			apiObj: this.$API.develop.edition.lists,
            query:{
                status:1
            },
			search: {
				time: null,
			},
			//所需数据选项
			cates: [],
		}
	},
	mounted() {
	},
	methods: {
		//查看
		table_show(row) {
			this.dialog.save = true;
			this.$nextTick(() => {
				this.$refs.saveDialog.open("show").setData(row);
			});
		},
		//搜索
		upsearch() {
			this.$refs.table.upData(this.search)
		},
        handleSuccess(data, mode) {
			if (mode == 'over') {
				this.$refs.table.refresh()
			} else if (mode == 'edit') {
				this.$refs.table.refresh()
			} else if (mode == 'set') {
				this.$refs.table.refresh()
			}
		},
	}
}
</script>

<style lang="scss">
.search-input {
	width: auto;
	font-size: 14px;
}
</style>
